package pack1;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by jack on 2017/7/2.
 * 功能类
 */
//使用@Service注解声明当前UseFunctionService类是spring管理的一个bean
@Service
public class UseFunctionService {
    //将FunctionService的实体Bean注入到UseFunctionService中，让UseFunctionService具备FunctionService
    //的功能，此处使用JSR-330的@Inject注解或者JSR-250的@Resource注解是等效的
    @Autowired
    FunctionService functionSerice;

    public String SayHello(String word)
    {
        return functionSerice.sayHello(word);
    }
}
